#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include "qmythread.h"
#include <QThread>
#include <QTimer>

namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT
private:
    QThreadProducer threadA;
    QThreadConsumer threadB;
protected:
    void closeEvent(QCloseEvent *event);

public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();

public slots:
    void on_threadStart_clicked();
    void on_stopThread_clicked();
    void on_threadB_started();
    void on_threadB_finished();
    void on_clearText_clicked();
    void on_threadB_newValue(int seq, int diceValue);

private:
    Ui::Dialog *ui;
};

#endif // DIALOG_H
